package com.wenwei.sharebox.utils;

import android.content.Context;

import com.wenwei.sharebox.base.Constant;
import com.wenwei.sharebox.bean.UserLoginBean;


/**
 * Created by Administrator on 2017/6/8.
 */
public class UserStringUtils {

    public static int getUserStats(Context mContext){
        UserLoginBean ub = RogerSPUtils.getObject(mContext, Constant.SP_USER_LOGIN_RESULT,UserLoginBean.class);
        if(ub!=null)
            return ub.getStatus();
        return 0;
    }

    public static String getUserToken(Context mContext){
        UserLoginBean ub = RogerSPUtils.getObject(mContext, Constant.SP_USER_LOGIN_RESULT,UserLoginBean.class);
        if(ub!=null)
            return "Bearer "+ub.getRememberToken();
        return "";
    }

    public static int getUserId(Context mContext){
        UserLoginBean ub = RogerSPUtils.getObject(mContext, Constant.SP_USER_LOGIN_RESULT,UserLoginBean.class);
        if(ub!=null)
            return ub.getId();
        return 0;
    }


}
